<?php $this->_extends('../_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/validator.js"></script>
<fieldset><legend>查询条件</legend>
<form method="get" action="">
<?include(Q::ini('custom_system/elements_dir') . 'searchform_element.php');?>
<table class="form_table">
<tbody>
<tr>
	<th>选择账号</th>
	<td>
		<select name="bmail_account">
			<option value='' > -- 请选择一个账号 --</option>
			<?foreach ($bmailAccount as $k => $v):?>
			<option value="<?=$k?>" <?php if ($currentAccount == $k) echo "selected='selected'"; ?>><?=$k?></option>
			<?php endforeach ?>
		</select>
	</td>
</tr>
<tr>
	<td></td>
	<td><input type="submit" value="查询" class="button"></td>
</tr>
</tbody></table>
</form>
</fieldset>
 <table width="100%" class="list_table" >
        <tr>
            <th>ID</th>
			<th>邮件名称</th>
			<th>状态</th>
			<th>创建时间</th>
			<th>发送</th>
			<th>开信</th>
			<th>点击</th>
			<th>跳出</th>
			<th>退订</th>
			<th>转发</th>
			<th>举报</th>
        </tr>
        
        <?foreach ($emaillists as $v):?>
        <tr>
        	<th><?=$v['id'];?></th>
			<td><?=$v['emailName'];?></td>
			<td><?=$v['status'];?></td>
			<td><?=$v['createdDate'];?></td>
			<td><?=$v['mailSent'];?></td>
			<td><?=$v['opens'];?></td>
			<td><?=$v['clicks'];?></td>
			<td><?=$v['bounces'];?></td>
			<td><?=$v['unsubscribes'];?></td>
			<td><?=$v['forwards'];?></td>
			<td><?=$v['abuseReports'];?></td>
        </tr>
        <?endforeach;?>
</table>

  
<?php $this->_endblock(); ?>